import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import { BrowserRouter } from 'react-router-dom'
import { Provider } from 'react-redux'
import { registerMicroApps, start } from 'qiankun'
import 'antd/dist/antd.css'
import './css/index.css'

import store from './store';

registerMicroApps([
  {
    name: 'Foo', // app name registered
    entry: process.env.REACT_APP_FOO_ENTRY,
    container: '#container',
    activeRule: '/foo',
  },
  {
    name: 'Bar', // app name registered
    entry: process.env.REACT_APP_BAR_ENTRY,
    container: '#container',
    activeRule: '/bar',
  },
])

start()
ReactDOM.render(
  <React.StrictMode>
    <BrowserRouter>
      <Provider store={store}>
        <App />
      </Provider>
    </BrowserRouter>
  </React.StrictMode>,
  document.getElementById('root')
)
